<!DOCTYPE html>

<?php include "res/title.php"; ?>

<html>
<head>
	<title>GoDeal - <?php echo $title; ?></title>
	<meta charset="UTF-8">

	<link href='http://fonts.googleapis.com/css?family=Open+Sans&subset=latin,cyrillic' rel='stylesheet' type='text/css'>
	<link rel="stylesheet" type="text/css" href="/css/style.css">
	<link rel="icon" type="image/png" href="/favicon.png" />

	<script type="text/javascript" src="/js/jquery-1.9.1.min.js"></script>
	<script type="text/javascript" src="/js/client-script.js"></script>
</head>
<body>

	<!-- Navigation -->
	<?php include "res/navigation.php"; ?>

	<div class="wrapper">
		<!-- Categories -->
		<?php include "res/categories.php"; ?>

		<!-- Right content -->
		<?php include "res/right-content.php" ?>

		<div class="container">
			<h1>Мои Купоны</h1>

			<div class="deal-menu">
				<div class="tab active" data-tab="1">Не распечатанные</div>
				<div class="tab" data-tab="2">Распечатанные</div>
			</div>

			

				<div class="tabs">
					<div class="tab-content active" id="tab-1">
						<table cellspacing='0' class="table-padding">
							<thead>
								<tr>
									<td>Услуга</td>
									<td>Номер купона</td>
									<td>Операции</td>
								</tr>
							</thead>
							<?php foreach ($coupons as $coupon): ?>
							<?php if($coupon->status != 0 || $coupon->printed == 1) continue; ?>
							<tr>
								<td><?php echo $coupon->prod_name ?></td>
								<td><?php echo $coupon->code ?></td>

								<td><a href="/godeal/home/getCoupon/<?php echo $coupon->id ?>">Версия для печати</a></td>
							</tr>
							<?php endforeach ?>
						</table>
					</div>

					<div class="tab-content" id="tab-2">
						<table cellspacing='0' class="table-padding">
							<thead>
								<tr>
									<td>Услуга</td>
									<td>Номер купона</td>
									<td>Операции</td>
								</tr>
							</thead>
							<?php foreach ($coupons as $coupon): ?>
							<?php if($coupon->status != 0 || $coupon->printed == 0) continue; ?>
							<tr>
								<td><?php echo $coupon->prod_name ?></td>
								<td><?php echo $coupon->code ?></td>

								<td><a href="/godeal/home/getCoupon/<?php echo $coupon->id ?>">Версия для печати</a></td>
							</tr>
							<?php endforeach ?>
						</table>
					</div>
				</div>
		</div>

		<!-- Footer -->
		<?php include "res/footer.php"; ?>
	</div>

	<!-- Popup Login -->
	<?php include "res/popup-login.php" ?>
</body>
</html>